Skip to content

feat(common): updated the ed25519 dalek crate - #3473

Draft
damrobi wants to merge 1 commit into
mainfrom
damrobi/msnark/3471-update-ed25519-dalek
Draft

feat(common): updated the ed25519 dalek crate#3473
damrobi wants to merge 1 commit into
mainfrom
damrobi/msnark/3471-update-ed25519-dalek

Conversation

@damrobi

@damrobi damrobi commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Content

This PR includes an update of the ed25519 dalek crate from 2.2.0 to 3.0.0. It also includes a bridge to link two incompatible version of rand_core.

Update options

Since we need to deal with two incompatible versions of rand_core (0.6.4 and 0.10.0) we need a way to handle the code that breaks with the update to the new dalek crate.
Currently only two spots break in the library due to calling ed25519-dalek::SigningKey::generate() :

We have two solutions to fix it for now:

  • Build a bridge between the two versions of rand_core: currently implemented in commit 608e1af
  • Update directly the spots that call the ed25519-dalek::SigningKey::generate() to replace them with the content of the generate function to bypass the trait difference issue. This would mean the function is not following potential updates in the ed25519-dalek crate

The ed25519-dalek::SigningKey::generate() function:

pub fn generate<R: CryptoRng + ?Sized>(csprng: &mut R) -> SigningKey {
     let mut secret = SecretKey::default();
     csprng.fill_bytes(&mut secret);
     Self::from_bytes(&secret)
}

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • CHANGELOG file is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • All check jobs of the CI have succeeded
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • No new TODOs introduced

Comments

Issue(s)

Closes #3471

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Test Results

     5 files  ±0     209 suites  ±0   1h 0m 15s ⏱️ - 6m 11s
 3 336 tests ±0   3 336 ✅ ±0  0 💤 ±0  0 ❌ ±0 
11 106 runs  ±0  11 106 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 608e1af. ± Comparison against base commit cfb446a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update ed25519-dalek dependency

1 participant